Skip to content

feat: add docs site and authenticated Files gateway plans - #127

Merged
adelrodriguez merged 1 commit into
mainfrom
07-31-feat_add_files_gateway_asset_index_plan_fix_marquee_spacing_align_table_formatting
Aug 1, 2026
Merged

feat: add docs site and authenticated Files gateway plans#127
adelrodriguez merged 1 commit into
mainfrom
07-31-feat_add_files_gateway_asset_index_plan_fix_marquee_spacing_align_table_formatting

Conversation

@adelrodriguez

Copy link
Copy Markdown
Collaborator

Adds two new planning documents and makes a minor spacing adjustment to the technology marquee.

Plan 16 — Documentation site outlines turning apps/docs into the public Init documentation site built on Astro Starlight. The plan establishes root docs/ as the single authored content source, loaded into Starlight via Astro's glob() loader rather than the default docsLoader(), so no content is copied or duplicated into the workspace. It defines which directories are published (consumer guides, architecture, Spanish localization) and which are excluded from public routes and search (agent instructions, template governance, and project ADRs). The plan covers the information architecture and sidebar structure, visual alignment with apps/web using the same palette, typography, and sky accent, and completion of site metadata including canonical URL, favicon, Open Graph, sitemap, edit links, and a static 404 page. It also records the dual-role nature of the workspace—serving Init's own documentation in the template repository and a scaffold owner's documentation in a derived project—in a new ADR.

Authenticated Files gateway and asset index proposes moving the Files SDK gateway from /v1/files to a top-level /files route to treat it as transport infrastructure alongside /auth, /trpc, and /workflows, reserving /v1/assets for a future application-owned interface. The plan describes wiring the existing requireSession middleware so the gateway reads the authenticated session from Hono's async context storage without a redundant auth lookup, and recording upload and deletion events in the storage.assets table directly inside an onAction hook using Drizzle inserts and updates. Hook failures are caught and logged without producing unhandled rejections. Copy and move operations, schema changes, transactional guarantees, and the /v1/assets interface are explicitly deferred.

The marquee component receives a small vertical spacing correction, changing the label padding from py-[0.7rem] to py-4 and the scroll container bottom padding from pb-4 to pb-6.

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
init Ready Ready Preview Jul 31, 2026 11:25pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 29fb7308-2286-4ab1-94ed-e22a29b62c16

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

adelrodriguez commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

@adelrodriguez
adelrodriguez marked this pull request as ready for review July 31, 2026 22:55
@adelrodriguez
adelrodriguez force-pushed the 07-31-feat_add_files_gateway_asset_index_plan_fix_marquee_spacing_align_table_formatting branch from d0616cd to 2d91ede Compare July 31, 2026 23:21
@adelrodriguez
adelrodriguez force-pushed the 07-31-feat_add_files_gateway_asset_index_plan_fix_marquee_spacing_align_table_formatting branch from 2d91ede to 292e661 Compare July 31, 2026 23:25
@adelrodriguez

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 292e661c03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"head",
"list",
"search",
"signedUploadUrl",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Record completion for presigned uploads

When a caller uses the permitted signedUploadUrl operation, the subsequent upload goes directly to S3 and therefore produces no upload hook event; the proposed hook also has no signedUploadUrl case. Unless the caller happens to issue a later head, the object is successfully stored but never receives an asset row, violating the plan's core indexing acceptance criterion. Either exclude this operation from the initial surface or add a reliable completion/reconciliation mechanism.

Useful? React with 👍 / 👎.

Comment on lines +306 to +310
void ctx.var.db
.update(assets)
.set({
status: "deleted",
updatedAt: new Date(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prevent upload writes from overtaking deletion

Because both handleUpload and this deletion update are launched fire-and-forget, an upload or head followed quickly by a delete can have the delete update execute first, match no row, and then have the delayed insert/upsert recreate the record as available. That leaves the index permanently claiming an object exists after S3 deleted it, so per-key mutations need ordering or deletion must persist a tombstone that a stale upload write cannot overwrite.

Useful? React with 👍 / 👎.

Comment on lines +130 to +132
```text
apps/api/src/routes/files.ts
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the files-client generator with the route move

When this move is implemented, turbo/generators/commands/files-client.ts will still require apps/api/src/routes/v1/files.ts, inspect the /v1 router for .route("/files", filesRoutes), and default clients to /v1/files. The generator will therefore reject every repository that follows this plan before producing a client; include its prerequisite checks, endpoint default, templates, and documentation in the route migration.

Useful? React with 👍 / 👎.

@adelrodriguez
adelrodriguez merged commit 72c02e3 into main Aug 1, 2026
12 checks passed
@adelrodriguez
adelrodriguez deleted the 07-31-feat_add_files_gateway_asset_index_plan_fix_marquee_spacing_align_table_formatting branch August 1, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant